package cn.mylife.common.enums;

/**
 * 响应消息代码
 *
 * @author: 潘海江
 * @date: 2020-06-11 18:44:19
 */
public enum RespCode {

    SUCCESS(0, "成功"),
    FAIL(1, "失败"),
    BAD_REQUEST(400, "参数异常"),
    UNAUTHORIZED(401, "token失效"),
    FORBIDDEN(403, "权限不足"),
    NOT_FOUND(404, "找不到资源"),
    METHOD_NOT_ALLOWED(405, "请求方法无效"),
    INTERNAL_SERVER_ERROR(500, "服务器内部错误");

    public int code;

    public String msg;

    RespCode(int code, String msg) {
        this.code = code;
        this.msg = msg;
    }

}
